import config from "@/config"
import http from "@/utils/request"

export default {
		add:{
			url: `${config.API_URL}/admin/dept`,
			name: "添加部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		update:{
			url: `${config.API_URL}/admin/dept`,
			name: "更新部门",
			put: async function(params){
				return await http.put(this.url, params);
			}
		},
		delete:{
			url: `${config.API_URL}/admin/dept`,
			name: "删除部门",
			delete: async function(params){
				return await http.delete(this.url, params);
			}
		},
		info:{
			url: `${config.API_URL}/admin/dept`,
			name: "获取部门",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		list:{
			url: `${config.API_URL}/admin/dept/list`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
}
